<!-- $Id: slide_edit.html 2012-03-31 wengcanvip@qq.com $ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑轮播</title>
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<{insert_scripts files="./js/jquery.min.js,swfobject.js,jquery.uploadify.v2.1.4.min.js,./include/kindeditor/kindeditor-min.js,./include/kindeditor/lang/zh_CN.js"}>
<style type="text/css">
.edit {
	background-color:#FFFFFF;
	padding:6px;
	border-bottom:2px solid #BEC6CE;
	border-right:2px solid #BEC6CE;
	border-top:1px solid #cccccc;
	border-left:1px solid #cccccc;
	margin:0 0 10px 0;
}
.edit table {
	width: 100%;
}
.edit table th {
	background-color:#FAF0D0;
	text-align:right;
	width:150px;
	height:35px;
	line-height:25px;
	border-bottom: #ffffff 1px solid;
	border-right: #cccccc 1px solid;
	font-weight:100;
	font-size:14px;
}
.edit table td {
	border-bottom: #cccccc 1px solid;
	border-right: #cccccc 1px solid;
	font-size:12px;
	color:#666666;
	text-align:left;
	padding:5px 5px 5px 7px;
}
/*.edit table td div{margin:2px 5px 3px 0; padding:0; float:left;border:1px solid #DCDBDB;}
.edit table td div p{margin:0px; padding:0;background:#F4F4F4; line-height:30px; text-align:center;}*/
</style>
<{insert_scripts files="./js/jquery.min.js,"}>
</head>
<body>
<form name="Form1" method="post" action="./index.php?c=admin&a=others&mod=slide&act=saveAction" id="Form1" enctype="multipart/form-data">
  <{if $res.id}>
  <input type="hidden" name="id" value="<{$res.id}>"/>
  <{else if $fid}>
  <input type="hidden" name="fid" value="<{$fid}>"/>
  <{/if}>
  <div class="box">
    <div class=box2>
      <table border=0 cellpadding=0 cellspacing=0>
        <tr>
          <th ><{if $fid==1||($res.fid&&$res.fid==1)}>设计师姓名<{else}>图片描述<{/if}>：</th>
          <td><input  name="discription" id="title" type="text" value="<{if $res.upload_discription}><{$res.upload_discription}><{/if}>" style="width:320px"/>
            <font color="#990000">【不在前台显示，只作为图片的标识，可不填】</font></td>
        </tr>
        <tr>
          <th style="border-bottom: #cccccc 1px solid">排序：</th>
          <td><input  name="show_order" id="show_order" type="text" value="<{if $res.show_order}><{$res.show_order}><{/if}>" style="width:160px"  />
            <font color="#990000">【数值越大，轮播显示越靠前】</font></td>
        </tr>
       <{if $fid==1||($res.fid&&$res.fid==1)}> 
 		<tr>
          <th >职位：</th>
          <td><input  name="temp1" " value="<{if $res.temp1}><{$res.temp1}><{/if}>" style="width:320px"/>
            <font color="#990000">【如果不为此图片设置链接，请将此填写为#】</font></td>
        </tr>
                <tr>
          <th >描述：</th>
          <td><textarea name="temp2" style="width:320px; height:62px;"><{if $res.temp2}><{$res.temp2}><{/if}></textarea>
            <font color="#990000">【如果不为此图片设置链接，请将此填写为#】</font></td>
        </tr>     
        <{else}>
		<tr>
          <th >链接地址：</th>
          <td><input  name="link_url" id="title" type="text" value="<{if $res.upload_link}><{$res.upload_link}><{else}>#<{/if}>" style="width:320px"/>
            <font color="#990000">【如果不为此图片设置链接，请将此填写为#】</font></td>
        </tr>  
        <{/if}>
        <tr>
          <th id='html_title'>缩略图：</th>
          <td><div  id="image_input_holder" >
              <input  name="thumb" id="thumb" type="text"  style="width:320px;" value="<{if $res.upload_url}><{$res.upload_url}><{/if}>" readonly="readonly"/>
            </div>
            <div id="uploadbtn" style="width:680px; height:40px;"><span id="btn_main" style="display:block; width:120px; height:30px; float:left; margin-top:10px;">
              <input id="file_upload" type="file" name="file_upload" />
              </span><span id="btn_dis" style=" display:block;margin-top:10px; float:left; line-height:30px; padding-left:20px; ">[提示:远程图片的完整链接，或上传图片;图片尺寸请自行控制]</span></div></td>
        </tr>
      </table>
    </div>
  </div>
  <p style="padding: 15px; text-align: center;">
    <input type="submit" name="Button1" value="保存" id="Button1" class="add" style="font-weight:bold;width:70px;" />
  </p>
</form>
<script type="text/javascript">
$(function(){
 $('#file_upload').uploadify({
    'uploader'  : './include/uploadify/uploadify.swf',
    'script'    : './upload.php/<{$upload}>',
    'cancelImg' : './include/uploadify/cancel.png',
    'folder'    : './upload/images/',
	'fileExt'   : '*.jpg;*.gif;*.png',
	'fileDesc'    : 'Image Files',
	'buttonImg' : './include/uploadify/button.jpg',
	'sizeLimit'   : 1024000,
    'auto'      :  true,
  	'onComplete'  : function(event, ID, fileObj, response, data) {
		if(response.match(/\/upload\//)){
			$("#thumb").val(response);
			$("#btn_main").hide();
			$("#btn_dis").html("<font color=red>[提示：图片已经成功上传，请勿修改上面文本框中的链接]</font>");
			$("#image_input_holder").show();
			}else{
				alert(response);
			}		
    	},
	  'onError'     : function (event,ID,fileObj,errorObj) {
     // alert(errorObj.type + ' 错误: ' + errorObj.info);
	 alert('上传出错，请稍后再尝试！');
    }	
  });	
});	
</script>
</body>
</html>
